package com.security.system.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRole  implements GrantedAuthority {
    private Integer rid;

    private String rname;

    private String rdesc;

    /**
    * 1代表true，0代表false
    */
    private Boolean delFlg;

    @JsonIgnore
    @Override
    public String getAuthority() {
        return rname;
    }
}